package edu.zut.cs.javaee.dream.nlp;

import java.util.List;

import edu.stanford.nlp.ie.util.RelationTriple;
import edu.stanford.nlp.pipeline.Annotation;
import edu.stanford.nlp.pipeline.StanfordCoreNLP;

public class RelationExtractor {

	StanfordCoreNLP pipeline;
	Annotation annotation;

	void init() {
		String props = "StanfordCoreNLP-chinese.properties";
		pipeline = new StanfordCoreNLP(props);
	}

	public List<RelationTriple> getRelations(String text) {
		annotation = new Annotation("习近平主席将在G20大阪峰会上深入阐述对世界经济形势的看法主张。在当前风云激荡的国际形势下，国际社会期待倾听“中国声音”。");
		pipeline.annotate(annotation);
		pipeline.prettyPrint(annotation, System.out);
		return null;

	}

}
